package edu.whu.puppygo.service;

import edu.whu.puppygo.entity.Pet;
import edu.whu.puppygo.vo.PetVo;
import edu.whu.puppygo.vo.UpdateAvatorVo;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Optional;

/**
 * @Author xinjiezhuang
 * @Date 2023-11-20
 */
public interface PetService {

    UpdateAvatorVo updatePetAvatarWithFile(Long petId, MultipartFile mpfile);

    Pet createPetWithPicture(Pet pet, MultipartFile mpfile);

    PetVo getPetVo(long userId);

    List<Pet> getAllPetsByUserId(Long userId);

    Optional<Pet> getPetById(long petId);

    Pet createPet(Pet pet);

    void deletePet(long petId);

    /**
     * 更新宠物的时候如果体重发生变化，要创建并保存PetRecord对象，然后更新Pet对象
     */
    Pet updatePet(Pet pet);

    /**
     * 更新宠物体重的时候要改变PetRecord和Pet的值
     */
    Pet updatePetWeight(long petId, String newWeight);

    List<Pet> create(Pet pet, MultipartFile mpfile);

    PetVo deletePetById(String petId);
}
